<div class="modal-header">
  <span class="grey">{{widget_title}}</span>
  <button type="button" class="close" ng-click="closeModal()"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
</div>
<div class="modal-body">
  <form role='form' name="certificate_form" class="form-horizontal" ng-submit='save()'>

    <div class='form-group'>
      <label class="col-sm-2 col-sm-offset-1 control-label"><span class="text-danger">*</span>员工姓名:</label>
      <div class="col-sm-9">
        <select class="col-sm-10" type="text" ng-model="certificate.employee_id" ng-options="(employee.dn | ldapUserId) as employee.name for employee in employees" readonly="true" required>
          <option value="">请选择</option>
        </select>
      </div>
    </div>

    <div class='form-group'>
      <label class="col-sm-2 col-sm-offset-1 control-label"><span class="text-danger">*</span>证书类型:</label>
      <div class="col-sm-9">
        <select class="col-sm-10" type="text" ng-model="certificate.paper_type_id" ng-options="certificate_type.id as certificate_type.name for certificate_type in certificate_types" required>
          <option value="">请选择</option>
        </select>
      </div>
    </div>

    <div class='form-group'>
      <label class="col-sm-2 col-sm-offset-1 control-label"><span class="text-danger">*</span>证书编号:</label>
      <div class="col-sm-9">
        <input class="col-sm-10" type="text" ng-model="certificate.paper_no" required>
      </div>
    </div>

    <div class='form-group'>
      <label class="col-sm-2 col-sm-offset-1 control-label"><span class="text-danger">*</span>到期日期:</label>
      <div class="col-sm-9">
        <!--
        <input type="text" class="input-time col-sm-10" ng-model="certificate.due_date" onClick="WdatePicker({dateFmt: 'yyyy-MM-dd', onpicked: function(){$(this).trigger('change')}});" readonly />
        -->
        <input type="text" class="col-sm-10" ng-model="certificate.due_date"  placeholder="请输入日期格式如： 2012/08/01" required/>
      </div>
    </div>

    <div class='form-group'>
      <label class="col-sm-2 col-sm-offset-1 control-label">描述:</label>
      <div class="col-sm-9">
        <textarea class="col-sm-10" type="text" ng-model="certificate.descr" />
      </div>
    </div>

    <div class= "form-group">
      <div class="col-sm-2 col-sm-offset-3">
        <button class="btn btn-info" ng-disabled="certificate_form.$invalid" type="submit" value="提交">提交</button>
      </div>
    </div>
  </form>
</div>
